package jpa;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the LINK database table.
 * 
 */
@Embeddable
public class LinkPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="LINK_PARENT")
	private long linkParent;

	@Column(name="LINK_CHILD")
	private long linkChild;

    public LinkPK() {
    }
	public long getLinkParent() {
		return this.linkParent;
	}
	public void setLinkParent(long linkParent) {
		this.linkParent = linkParent;
	}
	public long getLinkChild() {
		return this.linkChild;
	}
	public void setLinkChild(long linkChild) {
		this.linkChild = linkChild;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof LinkPK)) {
			return false;
		}
		LinkPK castOther = (LinkPK)other;
		return 
			(this.linkParent == castOther.linkParent)
			&& (this.linkChild == castOther.linkChild);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.linkParent ^ (this.linkParent >>> 32)));
		hash = hash * prime + ((int) (this.linkChild ^ (this.linkChild >>> 32)));
		
		return hash;
    }
}